import { get,post } from "../request";
// 列表
export interface Storeslist {
  key: String;
  services: String;
  page: Number; //条数
  psize: Number; //页数
}
const getlist = (data: Storeslist) => {
  return get("stores/list", data);
};
// 下拉
const getmenu = () => {
  return get("storeservices/list");
};
//单删
interface Storesdelete {
  id: Number;
}
const getdel = (data: Storesdelete) => {
  return get("stores/delete", data);
};
// 批量删除
interface StoresdeleteAll {
  ids: any;
}
const getdelAll = (data: StoresdeleteAll) => {
  return post("stores/deleteall", data);
};
//添加
const getadd= (data:any) => {
  return post("stores/add",data);
}
// 获取单条信息/修改
interface Stores{
  id:Number
}
const getsingle = (data:Stores) => {
  return get("stores/get", data);
}
export { getlist, getmenu, getdel ,getdelAll,getadd,getsingle};
